// 混入文件
import commonAPI from '@/api/commonAPI/commonAPI.js'
export const minxin = {
  methods: {
    // 请求用户角色数据
    async getRoles() {
      const { data: res } = await commonAPI({ method: 'get', url: 'roles' })
      if (res.meta.status !== 200) return this.$message.error(res.meta.msg)
      this.$message.success(res.meta.msg)
      this.rolesList = res.data
    }
  }
}

export const clearDialog = {
  methods: {
    clearDialog(refKey) {
      this.$refs[refKey].resetFields()
    }
  }
}
